package com.action.library;

import com.bean.library.Course;
import com.dao.DaoManager;
import com.dao.library.CourseDao;

public class SGetCourseAction {
	public Course getCourse(String courseId){
		DaoManager dm = DaoManager.getInstance();
		CourseDao courseDao = dm.getDao(CourseDao.class);
		Course course = null;
		try
		{
			dm.begin();
			course = courseDao.getCourseByCourseId(courseId);
			dm.commit();
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
		finally 
		{
			dm.end();
		}
		return course;
	}
}
